package nl.maarten.docenthelp.entity;

public enum UserType 
{
	STUDENT(0), 
	TEACHER(1);
	
	private int id;
	
	UserType(int id)
	{
		this.id = id;
	}
	
	public int getId()
	{
		return id;
	}
	
	public static UserType fromId(int id)
	{
		for(UserType type : values())
		{
			if(type.getId() == id)
			{
				return type;
			}
		}
		
		return null;
	}
}

